package com.winning.emr.base.utils;

import org.apache.tomcat.util.codec.binary.Base64;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.zip.Inflater;
import java.util.zip.InflaterInputStream;

/**
 * 编码
 *
 * @author ChenKuai
 * @create 2018-03-01 下午 6:36
 **/
public class Base64Utils {

    public static void main(String[] args) throws Exception {
        String blnr=
                "7L0HYBxJliUmL23Ke39K9UrX4HShCIBgEyTYkEAQ7MGIzeaS7B1pRyMpqyqBymVWZV1mFkDM7Z28995777333nvvvfe6O51OJ/ff/z9cZmQBbPbOStrJniGAqsgfP358Hz8iHn9RzfIyLWaffTTZ392ZPNzZ3b5/f2e2vZ8/eLh9MJvsb+/ce5DvHuzn5/d2P/0oXWaL/LOP/ss/40/+r/+cf+C//DP/8P/sH/hj/6u/4a/6r/6Gv+e/+hv+pv/87//Tt4a+uPNROsubaV2s2qJafvbRf/En/on/1T/4N/3nf/zf/F//kX+83/q//HP+sP/s7/p7/4s/7g/+z/6ev+c//YP+4P/8T/xD/vM/5i+Sr+iT//xP/rP+s7/3L//P/8Q/5r/46/+y/+Kv+4v1lb/nr/mv/oo/+D/9g/6Qj9I2f9cOI0fI02Db6xUNgIf9UTrNlqu6WNJLz7KyyT9K+a+z5Zez2cvsIm/s57OiWZXZ9Wcf7ez8AX/AH7DzB+x+lP5kXjc8lgcPqOeiLXPbaPcP2EWLedWsijYrp9RZnS0vqN/dnZ2dB+iXPq4u8MVnHz3Z/nRvd+ejtCjLZd40QFC+eEbPR2kzzcp8AXzfLcrPPvoo5d/p7WI6rZZtDuzp5eWMfjtdZhPCw6JdNK/yyyK/8j44r+qF/RN/TMusaRhEc1JWTX5ybL9u1pNF0Z4cn1RVPSuWWZujXbae9T9cZO/q/Bx8tLv3UfoqL+nzs2XTZstpfkaf7nx09PhVfs6cdp9+x1TQH4Rz0YKsjFrxzsO9WWXTfF6VRDv+PmurxWXRFDTAvDNM7yvgMiuyi2XVFI3M9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zzSlJ5dneo0DOrx1yzVBpvZZawQxjfr5T9BvBPk/v+Gv+M//5v/gv/ib/kL/+s/6M/5L//cv+E//6P/eKj8P5Qi4D83yDSw/CEs6AbAJofOn+2JsHOC+6GoRwRbmeZWOHX5QNurKcHf+UPR2AT7/TIa9OwZusnv3xCJ/su/98/+z/6eP0oIYtOTlLb6r//sP54C9P/qz/1j/8s/+++nP/+zf/DP/y/+mL/MJoPEQ+iRDqb2/EBJGCMF23FHErPOIakxMRRMShPaI/uxI//n3L9pt2vJKFpPA5MwJdV3W74u6e95pL9RM9+a9P/FH/tX/xd/3l/o+A6DVkRvFVP8F3+hZyU1pgBl85tdjg9J9VPS5r/+a5wDYtMvu7fp+b/44/7I/+Iv+iPdmD9V1PHyzWP+o/4y3w1GJgprL7dzg0XaHdqBVN7Y85/4Z/3nf5yXKQa6oDb478aev6Z1u3+we35vZ+/B9r3s053t/Xxnsv0wO9jbnu7N9mZ5fm938iAA9B7WTZKN/+Vf/w/853/SH2+sW/hZx7rdfxBat6efhraN7NmH/M/vm1Kg//83jTzfX2B+jv6fAAAA//8=";
        String decodeBlnr = unzipEmrXml(blnr);
        System.out.println(decodeBlnr);

    }

    /**
     * 解压解密EMR病历内容
     * @param emrContent
     * @return
     */
    public static String unzipEmrXml(String emrContent) throws IOException {
        if (emrContent.indexOf("winningemr") == 0 && emrContent.lastIndexOf("winningemr") == (emrContent.length() - 10))
            emrContent = emrContent.substring(10, emrContent.length() - 20 - 1);
        byte[] arr = Base64.decodeBase64(emrContent);
        ByteArrayInputStream ms = new ByteArrayInputStream(arr);
        InflaterInputStream inflater = new InflaterInputStream(ms, new Inflater(true));
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        int len = 0;
        byte[] part = new byte[1024];
        try {
            while (true) {
                len = inflater.read(part);
                if (len == -1) break;
                os.write(part, 0, len);
            }
            inflater.close();
            os.flush();
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            if(os != null){
                os.close();
            }
        }
        Charset charset = Charset.forName("utf-8");
        return new String(os.toByteArray(), charset);
    }


}
